﻿<UserControl x:Class="VoiceRecorder.AutoTuneView"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             Background="Khaki"
             mc:Ignorable="d" 
             d:DesignHeight="360" d:DesignWidth="300">
    <Grid>
    <StackPanel IsEnabled="{Binding IsEnabled}">
        <Label Margin="5" HorizontalAlignment="Center" FontWeight="Bold" FontSize="20">AutoTune Settings</Label>
        <StackPanel Orientation="Horizontal">
            <CheckBox IsChecked="{Binding IsAutoTuneEnabled}" Margin="5">Enable Autotune</CheckBox>
        </StackPanel>
        <StackPanel Orientation="Horizontal">
            <Label Margin="5">Attack</Label>
            <Slider Margin="5" Value="{Binding Path=AttackTime, Mode=TwoWay}" Orientation="Horizontal" Minimum="0" Maximum="200" SmallChange="10" LargeChange="25" Width="180"/>
            <Label Margin="5" Content="{Binding AttackMessage}" />
        </StackPanel>
            <StackPanel Orientation="Horizontal">
                <Label Margin="5,0">Scale:</Label>
                <ComboBox Margin="5,0" ItemsSource="{Binding Scales}" SelectedItem="{Binding SelectedScale}" Width="150"/>
            </StackPanel>
            <Label Margin="5,0" Content="Snap Pitches:"/>
        <ItemsControl Margin="5" Height="100" ItemsSource="{Binding Pitches}">
            <ItemsControl.ItemsPanel>
                <ItemsPanelTemplate>
                    <WrapPanel />
                </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
                <DataTemplate>
                    <CheckBox IsChecked="{Binding Selected}" Content="{Binding DisplayName}" FontSize="16" Width="60" />
                </DataTemplate>
            </ItemsControl.ItemTemplate>
        </ItemsControl>
        <StackPanel Orientation="Horizontal">
            <Button Margin="5" Width="100" Command="{Binding ApplyCommand}">Apply</Button>
            <Button Margin="5" Width="100" Command="{Binding CancelCommand}">Cancel</Button>
        </StackPanel>
    </StackPanel>
        <Border BorderBrush="Black" BorderThickness="4" 
                CornerRadius="10" HorizontalAlignment="Center" 
                VerticalAlignment="Center" Padding="20" Background="Azure" 
                Visibility="{Binding ProcessingMessageVisibility}">
            <StackPanel>
                <TextBlock Text="Processing..." FontSize="20"/>
                <TextBlock Text="Please Wait" HorizontalAlignment="Center"/>
            </StackPanel>
        </Border>
    </Grid>
</UserControl>
